]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ShellWindowTracker: don't create ShellApps for non-interesting windows
authorDan Winship <danw@gnome.org>
Wed, 9 Mar 2011 13:58:27 +0000 (08:58 -0500)
committerDan Winship <danw@gnome.org>
Tue, 15 Mar 2011 19:37:08 +0000 (15:37 -0400)
If a process does not have any "interesting" windows, then it can't be
considered a running app. (Previously we were calling
get_app_for_window() before ruling out non-interesting windows, which
ended up calling _shell_app_new_for_window(), which would add the
window to the ShellApp directly, bypassing the is_interesting check.)

https://bugzilla.gnome.org/show_bug.cgi?id=642221

src/shell-window-tracker.c

index d2889236f6f312b1d1d29be3144d77fe20028e88..44a4a48e375c88d83ed84dec40300ab76a9ecad2 100644 (file)
@@ -225,23 +225,6 @@ get_appid_from_window (MetaWindow  *window)
   return appid_guess;
 }
 
-/**
- * window_is_tracked:
- *
- * We don't attempt to associate override-redirect windows with applications
- * at all, since there's no reason to do so yet.
- *
- * Returns: %TRUE iff we want to scan this window for application association
- */
-static gboolean
-window_is_tracked (MetaWindow *window)
-{
-  if (meta_window_is_override_redirect (window))
-    return FALSE;
-
-  return TRUE;
-}
-
 /**
  * shell_window_tracker_is_window_interesting:
  *
@@ -529,7 +512,7 @@ track_window (ShellWindowTracker *self,
 {
   ShellApp *app;
 
-  if (!window_is_tracked (window))
+  if (!shell_window_tracker_is_window_interesting (window))
     return;
 
   app = get_app_for_window (self, window);
@@ -539,10 +522,6 @@ track_window (ShellWindowTracker *self,
   /* At this point we've stored the association from window -> application */
   g_hash_table_insert (self->window_to_app, window, app);
 
-  /* However, only put interesting windows in the window list for an app. */
-  if (!shell_window_tracker_is_window_interesting (window))
-    return;
-
   if (shell_app_is_transient (app))
     {
       /* For a transient application, it's possible one of our title regexps